import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fixnum/fixnum.dart' as $fixnum;

class RoomRankSubPage extends StatefulWidget {
  // final RoomRankTypeEnum rankTypeEnum;
  final $fixnum.Int64 channelId;

  RoomRankSubPage({required this.channelId});

  @override
  State<StatefulWidget> createState() => _State();
}

class _State extends State<RoomRankSubPage> with TickerProviderStateMixin {
  late TabController _tabController;
  // late List<RankDateEnum> _rankDates;

  @override
  void initState() {
    super.initState();
    // _rankDates = RankDateEnum.values.toList();
    // if (widget.rankTypeEnum != RoomRankTypeEnum.charm) {
    //   _rankDates.removeWhere((element) => element == RankDateEnum.hour);
    // }
    // _tabController = TabController(length: _rankDates.length, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisSize: MainAxisSize.max,
      children: [
        Text('Column'),

        // SizedBox(
        //   height: 36.h,
        //   child: JRSwitchTabBar(
        //     controller: _tabController,
        //     titles: _rankDates.map((e) => e.title).toList(),
        //   ),
        // ),
        // SizedBox(height: 12.h),
        // Expanded(
        //   child: ExtendedTabBarView(
        //     controller: _tabController,
        //     children: _rankDates
        //         .map<Widget>((e) => KeepAliveWrapper(
        //             child: RoomRankDatePage(
        //                 channelId: widget.channelId,
        //                 scope: e.getScope(widget.rankTypeEnum))))
        //         .toList(),
        //   ),
        // ),
      ],
    );
  }
}

// extension RankDateEnumExt on RankDateEnum {
//   String getScope(RoomRankTypeEnum type) {
//     return '${type.name}_$name';
//   }

//   String get title {
//     switch (this) {
//       case RankDateEnum.day:
//         return T.current!.day_rank;
//       case RankDateEnum.week:
//         return T.current!.week_rank;
//       case RankDateEnum.month:
//         return T.current!.month_rank;
//       case RankDateEnum.hour:
//         return T.current!.hour_rank;
//     }
//   }
// }
